home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ Win2K Explorer From Here.xpl < prev    next >
Text File  |  2002-03-16  |  2KB  |  76 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="2"
  4. "UIPATH 1"="Appearance\Files&Folders\Folders Context Menu"
  5. "UIPATH 2"="Appearance\Files&Folders\Drives"
  6. "NAME"="Explorer From Here Context Menu"
  7. "VERSION"="3.00"
  8. "LANGUAGE"="VBScript"
  9. "OSVERSION"="0001011"
  10. "TEXT 1"="Enable "Explore From Here" command for directories"
  11. "TEXT 2"="Enable "Explore From Here" command for drive root"
  12. "DESCRIPTION 1"="This option lets you add a "Explore From Here" option to the context menus of folders and drive root folders respectively."
  13. "DESCRIPTION 2"="When you click on this option, a Explorer Window is opened showing the selected folder as root."
  14. "AUTHOR"="Xteq Systems"
  15. "CONTACTURL"="http://www.xteq.com"
  16. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  17. "COMMENT 1"="ource: http://www2.cajun.net/~theriots/blk/xp_reg_edits.htm found by CptSiskoX"
  18.  
  19.  
  20. sName="E&xplore From Here"
  21.  
  22. sP1_A="HKCR\Directory\Shell\ExploreHere"
  23. sP1_B="HKCR\Directory\Shell\ExploreHere\Command"
  24.  
  25. sP2_A="HKCR\Drive\Shell\ExploreHere"
  26. sP2_B="HKCR\Drive\Shell\ExploreHere\Command"
  27.  
  28. Sub Plugin_Initialize 
  29.  s=RegReadValue(sP1_B & "\@")
  30.  if Len(s)>0 then
  31.     SetUIElement 1,true
  32.  end if 
  33.  
  34.  s=RegReadValue(sP2_B & "\@")
  35.  if Len(s)>0 then
  36.     SetUIElement 2,true
  37.  end if 
  38. End Sub
  39.  
  40. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  41.  s="explorer.exe /e,/root,""%1"""
  42.  
  43.  if GetUIElement(1)=true then
  44.     Call RegWriteValue(sp1_A & "\@",sName,1)
  45.     Call RegWriteValue(sp1_B & "\@",s,1)
  46.  else 'Disable it!
  47.     if RegPathExists(sP1_B) then Call RegDeletePath(sP1_B)
  48.     if RegPathExists(sP1_A) then Call RegDeletePath(sP1_A)
  49.  end if
  50.  
  51.  if GetUIElement(2)=true then
  52.     Call RegWriteValue(sp2_A & "\@",sName,1)
  53.     Call RegWriteValue(sp2_B & "\@",s,1)
  54.  else 'Disable it!
  55.     if RegPathExists(sP2_B) then Call RegDeletePath(sP2_B)
  56.     if RegPathExists(sP2_A) then Call RegDeletePath(sP2_A)
  57.  end if
  58.  
  59.  
  60. End Sub
  61.  
  62. Sub Plugin_Terminate 
  63. End Sub
  64.  
  65. Function BuildCommandString
  66.  csVer=GetWinVer
  67.  if csVer=1 or csVer=3 or csVer=5 then 'Windows 95/98/ME
  68.     csPath=GetWinDir
  69.     csPath=csPath & "command.com /k cd ""%1"""
  70.  else 'NT/2K/XP
  71.     csPath=GetWinSysDir
  72.     csPath=csPath & "cmd.exe /k cd ""%1"""
  73.  end if    
  74.  
  75.  BuildCommandString=csPath
  76. End Function